package designmode.factory;

/**
 * Created by fuchaoyang on 2018/4/20.<br/>
 * description：
 */

public class TestAbstractFactory {

  public static void main(String[] args) {
    AmdFactory amdFactory = new AmdFactory();
    ICpu cpu = amdFactory.createCpu();
    cpu.calculate();
    IMainboard mainBoard = amdFactory.createMainBoard();
    mainBoard.installCPU();

    IntelFactory intelFactory = new IntelFactory();
    intelFactory.createCpu();
    intelFactory.createMainBoard();
  }
}
